package az.mecid.rssreader.client.ui.widget;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.*;

/**
 * Created by IntelliJ IDEA.
 * User: mega
 * Date: 24.02.2010
 * Time: 21:33:10
 */
public class MenuWidget extends Composite{

    private Tree menu;
    private TreeItem allFeeds;
    private TreeItem favourites;
    private TreeItem popular;
    private TreeItem rootMenuWidget;

    public TreeItem getAllFeeds() {
        return allFeeds;
    }

    public TreeItem getFavourites() {
        return favourites;
    }

    public TreeItem getPopular() {
        return popular;
    }

    public TreeItem getRootMenuWidget() {
        return rootMenuWidget;
    }

    public Tree getMenu() {
        return menu;
    }

    public MenuWidget() {

        menu = new Tree();

        allFeeds = new TreeItem("All News");
        favourites = new TreeItem("Favorites");
        popular = new TreeItem("Popular");
        rootMenuWidget = new TreeItem("Main Page");


        menu.addItem(rootMenuWidget);
        menu.addItem(allFeeds);
        menu.addItem(favourites);
        menu.addItem(popular);
        DecoratorPanel panel = new DecoratorPanel();
        panel.add(menu);

        initWidget(panel);
    }
}
